{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "6a78b434-9e25-4f16-85d4-00f19db515bd",
   "metadata": {},
   "source": [
    "# Geographic Points\n",
    "\n",
    "A geographic points plot showing (earthquakes) plotted with their correct geographic coordinates and spatial reference system. This example uses the `earthquakes` dataset. [GeoViews](https://geoviews.org/) needs to be installed to enable the `features` option. Earthquake locations are expressed in lat/lon coordinates and are projected with the Plate Carree projection."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "873d530b-58a5-4225-8083-e9d375677bd4",
   "metadata": {},
   "outputs": [],
   "source": [
    "import hvplot.pandas  # noqa\n",
    "\n",
    "df = hvplot.sampledata.earthquakes(\"pandas\")\n",
    "\n",
    "df.hvplot.points(\n",
    "    x='lon',\n",
    "    y='lat',\n",
    "    title='Earthquake Locations (Bokeh)',\n",
    "    xlabel='Longitude',\n",
    "    ylabel='Latitude',\n",
    "    alpha=0.5,\n",
    "    color='mag',\n",
    "    cmap='viridis_r',\n",
    "    geo=True,\n",
    "    features=['coastline'],\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d2c100f2-e730-4d89-a027-442ca13c8fa1",
   "metadata": {},
   "outputs": [],
   "source": [
    "import hvplot.pandas  # noqa\n",
    "hvplot.extension('matplotlib')\n",
    "\n",
    "df = hvplot.sampledata.earthquakes(\"pandas\")\n",
    "\n",
    "df.hvplot.points(\n",
    "    x='lon',\n",
    "    y='lat',\n",
    "    title='Earthquake Locations (Matplotlib)',\n",
    "    xlabel='Longitude',\n",
    "    ylabel='Latitude',\n",
    "    alpha=0.5,\n",
    "    color='mag',\n",
    "    cmap='viridis_r',\n",
    "    geo=True,\n",
    "    features=['coastline'],\n",
    "    width=700,\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "222060ed-8262-42c2-86bf-d9d0aa2c6865",
   "metadata": {},
   "source": [
    ":::{seealso}\n",
    "- [Points Plots reference documentation](../../ref/api/manual/hvplot.hvPlot.points.ipynb).\n",
    ":::"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python",
   "pygments_lexer": "ipython3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
